package org.chengn.level_middle.context1276;

import java.util.ArrayList;
import java.util.List;

/**
 * @Title: Context1276
 * @Author ChengN
 * @Package org.chengn.level_middle.context1276
 * @Date 2023/12/25 0:15
 * @description: 不浪费原料的汉堡制作方案
 */
public class Context1276 {
    public List<Integer> numOfBurgers(int tomatoSlices, int cheeseSlices) {
        int a = (tomatoSlices - cheeseSlices * 2);
        if (a % 2 == 1 || a < 0 || cheeseSlices < a / 2) {
            return new ArrayList<>();
        }
        List<Integer> objects = new ArrayList<>();
        objects.add(a / 2);
        objects.add(cheeseSlices - a / 2);
        return objects;
    }
}
